﻿using Iworld.basis.Service;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Iworld.Author.Service.Backstage.Import
{
    [DataContract]
    public class GenerateRechargeCardImport : CheckAdministratorImportBase, Iworld.Author.Manager.RechargeCardManager.IPackageForGenerate
    {
        [DataMember]
        public double Golds {set;get;}

        public int AdministratorId
        {
            get{return this.Self.Id;}
        }

        public override void CheckAllowExecuteOrNot(Main.Impl.ModelToDbContext db)
        {
            base.CheckAllowExecuteOrNot(db);
            if (!Self.Group.CanCreateRechargeCard)
            {
                throw new Exception("你无权生成充值卡");
            }

        }
    }
}
